package ${model.packageFullName};

import io.swagger.v3.oas.annotations.media.Schema;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import jakarta.validation.constraints.*;
import jakarta.annotation.Nullable;
import java.io.Serializable;

/**
* ${model.remark} data transform object.
*
* @author Caspar
*/
@Data
@SuperBuilder
@NoArgsConstructor
@AllArgsConstructor
@Schema(title = ${model.className}.TABLE_DESC)
public class ${model.className} implements Serializable {

  public static final String TABLE_NAME = "${model.tableName}";
  public static final String TABLE_DESC = "${model.remark}";
  <#list model.fields as field>
  public static final String ${field.remarkMeta.columnNameFieldName} = "${field.remarkMeta.columnName}";
  public static final String ${field.remarkMeta.titleFieldName} = "${field.remarkMeta.titleFieldContent}";
  public static final String ${field.remarkMeta.descFieldName} = "${field.remarkMeta.descFieldContent}";
  </#list>

  <#list model.fields as field>
  <#if model.source.outputDtoRemarkFlag>
  /**
  * ${field.remark} ${field.remarkNotes}
  */
  </#if>
  <#if field.stringSizeValid??>
  @Size(max = ${field.stringSizeValid})
  </#if>
  @Schema(title = ${field.remarkMeta.titleFieldName}, description = ${field.remarkMeta.descFieldName})
  private ${field.type} ${field.name};

  </#list>
}